const express = require('express')

const router = express.Router()

// 引入验证规则模块
const expressJoi = require('@escook/express-joi')
const { reg_login_schema } = require('../schema/user')


// 引入对应的处理函数
const userHandler = require('../router_handler/user')

// 注册
router.post('/register', expressJoi(reg_login_schema), userHandler.regUser)

// 登录
router.post('/login', expressJoi(reg_login_schema), userHandler.loginUser)

module.exports = router